<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../css/mui.min.css">
		<link rel="stylesheet" href="../../css/mui.picker.min.css" />
		<link rel="stylesheet" href="../../css/iconfont.css">
		<style>
			.mui-content-padded{margin:5px 0 0 0;}
			.mui-row-list span{float: left; line-height:33px; width:20%;}
			.mui-row-list select{float: left; line-height:14px; font-size:14px; margin-top:2px; margin-left: 5px;}
			.mui-btn-block{margin-bottom:0; padding:6px;}
			.mui-col-sm-12{ border-top: 1px solid #D1D1D1; width:100%; padding-top:5px; font-size:14px;}
			input{text-align: left;}
			input[type="text"]{height:30px; margin-bottom: 5px;}
			input[type="text"],input[type="number"]{height:26px; padding: 0;border-width:0; border-bottom: #dddddd 1px solid; margin-bottom:0;background:none;}
			input[readonly="readonly"]{ text-align: left; padding-left: 5px; padding-right: 0;}
			input{border-width: 0; height: 26px; float: right; text-align: right; padding-right: 15px;}
			form:before{ background: none !important; border: none !important;}
			
			.mui-switch:before {content: '无'; color: #fff; }
			.mui-switch{border-color: #fd933b; background-color: #007AFF; border-width: 0px;}
			.mui-switch.mui-active:before {content: '有'; color: #fff;}
			.mui-switch.mui-active {border-color: #007AFF; background-color: #fd933b;}
			
			.mui-switch.new1:before {content: '无'; color: #fff;}
			.mui-switch.new1{border-color: #fd933b; background-color: #007AFF; border-width: 0px;}
			.mui-switch.mui-active.new1:before {content: '有'; color: #fff;}
			.mui-switch.mui-active.new1 {border-color: #007AFF; background-color: #fd933b;}
			
			.mui-switch.new2:before {content: '未见异常'; color: #fff;}
			.mui-switch.new2{border-width: 1px; width:95px;border-color: #007AFF;background-color: #007AFF;}
			.mui-switch.mui-active.new2:before {content: '异常'; color: #fff;}
			.mui-switch.mui-active.new2 {border-color: #fd933b;background-color: #fd933b;}
			.mui-switch.mui-active.new2 .mui-switch-handle{
				-webkit-transform: translate(63px,0);
				transform: translate(63px,0);
			}
			
			.mui-switch.new3:before {content: '未闭合'; color: #fff;}
			.mui-switch.new3{border-width: 1px; width:95px;border-color: #007AFF;background-color: #007AFF;}
			.mui-switch.mui-active.new3:before {content: '闭合'; color: #fff;}
			.mui-switch.mui-active.new3 {border-color: #fd933b;background-color: #fd933b;}
			.mui-switch.mui-active.new3 .mui-switch-handle{
				-webkit-transform: translate(63px,0);
				transform: translate(63px,0);
			}
			
			.mui-switch.new4:before {content: '通过'; color: #fff;}
			.mui-switch.new4{border-width: 1px; width:95px;border-color: #007AFF;background-color: #007AFF;}
			.mui-switch.mui-active.new4:before {content: '未通过'; color: #fff;}
			.mui-switch.mui-active.new4 {border-color: #fd933b;background-color: #fd933b;}
			.mui-switch.mui-active.new4 .mui-switch-handle{
				-webkit-transform: translate(63px,0);
				transform: translate(63px,0);
			}
			
			.mui-table-view-cell.mui-active{ display:block;}
			.mui-table-view-cell-1{padding: 5px 15px; position: relative; overflow: hidden;}
			.border0{border-width: 0; border-bottom: #dddddd 1px solid;}
			.ui-alert{font-size: 14px;}
			#Popup {
				width: 0px;
				height: 0px;
				background: red;
				position: fixed;
				top: 70%;
				left: 50%;
			}
			.mui-popover{
				width: 300px;
			}
			.mui-popover .mui-popover-arrow:after {
				width: 0px;
			}
			/**/

			/**/
			.popover-cont ul{
				margin-top: 5px; 
				margin: 0; 
				padding: 0; 
				list-style: none; 
				background: #ffffff;
			}
			.table{
				width: 100%;
			}
			.thead{
				width: 100%;
				border: 1px solid #007AFF;
			}
			.thead tr{
				 width: 100%; 
				 background-color: #007AFF;
				 height: 20px;
			}
			.thead tr th{
				color: #ffffff;
				border-right: 1px solid #ffffff;
				text-align: center;
				font-family: "microsoft yahei";
				font-size: 14px;
				line-height: 20px;
			}
			.tbody{
				width: 100%;
				border: 1px solid #007AFF;
			}
			.tbody tr{
				 width: 100%; 
				 height: 20px;
			}
			.tbody tr td{
				color: #000;
				border: 1px solid #007AFF;
				text-align: center;
				font-family: "microsoft yahei";
				font-size: 14px;
				line-height: 20px;
			}
			.div-tab{
				width: 100%; 
				height: 200px; 
				overflow-y: scroll;
			}
			.div-tab::-webkit-scrollbar {
				display: none;
			}
			.submit{
				margin:0 auto 10px auto; 
				width:200px; 
				height:35px; 
				line-height: 35px; 
				background-color:#007AFF; 
				text-align: center; 
				color: #FFFFFF; 
				border-radius: 10px;
			}
			.mui-ul-check{ width: 100%; margin: 0; padding: 0;}
			.mui-ul-check li{float: left; list-style-type:none; text-align: center; padding:5px; margin:2px; border:1px solid #D1D1D1;}
			.mui-ul-check li.on{ background-color:#007AFF; color:#FFFFFF; float: left; list-style-type:none; text-align: center; padding:5px; margin:2px;}
			.disable{color: #bbb;}
			.ui-list{ float: left; width: 50%;}
			.ui-list li{ list-style-type:none; line-height: 36px; height: 37px;}
		</style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title" id="high_id">1-2岁健康检查</h1>
		</header>
		<div class="mui-conten" style="margin-top:50px;">
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-row">
					<div class="mui-col-sm-12 mui-col-xs-12">
						<li class="mui-table-view-cell">
							<a data-options='{"type":"date"}' class="btn mui-navigate-right">
								<div style="float: left; font-size: 14px; width: 90px; line-height: 26px;">月(年)龄</div>
								<input id="result0" class="ui-alert" value="12月龄" placeholder="请选择" style="width:50%;"/>
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a data-options='{"type":"date"}' class="btn mui-navigate-right">
								<div style="float: left; font-size: 14px; width: 90px; line-height: 26px;">随访日期</div>
								<input id="result1" class="ui-alert" placeholder="请选择" style="width:50%;"/>
							</a>
						</li>
						<li class="mui-table-view-cell">
							<div style="float: left; font-size: 14px; width:90px; line-height: 26px;">体重</div>
							<div style="float: right; font-size: 14px; width: 50px; line-height: 26px; text-align:center;">kg</div>
							<input  id='kg' class="ui-alert border0" type="number" placeholder="" style="float:right; width:110px; text-align:center;"/>
						</li>
						<li class="mui-table-view-cell">
							<a data-options='{"type":"date"}' class="btn mui-navigate-right">
								<div style="float: left; font-size: 14px; width: 90px; line-height: 26px;">体重发育情况</div>
								<input id="result2" class="ui-alert" placeholder="请选择" style="width:50%;"/>
							</a>
						</li>
						<li class="mui-table-view-cell">
							<div style="float: left; font-size: 14px; width:90px; line-height: 26px;">身长</div>
							<div style="float: right; font-size: 14px; width: 50px; line-height: 26px; text-align:center;">cm</div>
							<input  id='cm' class="ui-alert border0" type="number" placeholder="" style="float:right; width:110px; text-align:center;"/>
						</li>
						<li class="mui-table-view-cell">
							<a data-options='{"type":"date"}' class="btn mui-navigate-right">
								<div style="float: left; font-size: 14px; width: 90px; line-height: 26px;">身长发育情况</div>
								<input id="result3" class="ui-alert" placeholder="请选择" style="width:50%;"/>
							</a>
						</li>
					</div>
				</div>
			</ul>
			<div style="clear:both; font-size: 16px; line-height:25px; margin-left:15px; margin-top: 5px;">体格检查</div>
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-col-sm-12 mui-col-xs-12">
					<li class="mui-table-view-cell">
						<a data-options='{"type":"date"}' class="btn mui-navigate-right">
							<div style="float: left; font-size: 14px; width: 90px; line-height: 26px;">面色</div>
							<input id="result4" class="ui-alert" placeholder="请选择" style="width:50%;"/>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">皮肤</div>
						<div class="mui-switch new2" id="mySwitch5">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="tigshow_doc_5" style="display: none;">
						<input class="ui-alert border0" id="doc_5"  placeholder="请输入" style="float: left; width:100%; text-align: right; padding: 0 10px;"/>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">前囟</div>
						<div class="alert" id="ql_class1" style="display: none; float: right; font-size: 14px; width:50%; line-height: 26px; text-align:right;">----------------------------</div>
						<div class="mui-switch new3" id="mySwitch6">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="tigshow_doc_6" style="display: none;">
						<input id='front_1' class="ui-alert border0" type="number" placeholder="" style="float:left; width:70px; text-align:center;"/>
						<div style="float: left; font-size: 14px; width:40px; line-height: 26px; text-align:center;">cm X</div>
						<input id='front_2' class="ui-alert border0" type="number" placeholder="" style="float:left; width:70px; text-align:center;"/>
						<div style="float: left; font-size: 14px; width:40px; line-height: 26px; text-align:center;">cm</div>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">眼睛</div>
						<div class="mui-switch new2" id="mySwitch8">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="tigshow_doc_8" style="display: none;">
						<input class="ui-alert border0" id="doc_8"  placeholder="请输入" style="float: left; width:100%; text-align: right; padding: 0 10px;"/>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">耳外观</div>
						<div class="mui-switch new2" id="mySwitch9">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="tigshow_doc_9" style="display: none;">
						<input class="ui-alert border0" id="doc_9"  placeholder="请输入" style="float: left; width:100%; text-align: right; padding: 0 10px;"/>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">听力</div>
						<div class="alert" id="tl_class1" style="display: none; float: right; font-size: 14px; width:50%; line-height: 26px; text-align:right;">----------------------------</div>
						<div class="mui-switch new4" id="mySwitch10">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="tigshow_doc_10" style="display: none;">
						<input class="ui-alert border0" id="doc_10"  placeholder="请输入" style="float: left; width:100%; text-align: right; padding: 0 10px;"/>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size: 14px; width:120px; line-height: 26px;">出牙/龋齿数(颗)</div>
						<input id='tooth2' class="ui-alert border0" type="number" placeholder="" style="float:right; width:50px; text-align:center;"/>
						<div style="float:right; width: 30px; text-align: center; line-height: 26px;">/</div>
						<input id='tooth1' class="ui-alert border0" type="number" placeholder="" style="float:right; width:50px; text-align:center;"/>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">胸部</div>
						<div class="mui-switch new2" id="mySwitch11">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="tigshow_doc_11" style="display: none;">
						<input class="ui-alert border0" id="doc_11"  placeholder="请输入" style="float: left; width:100%; text-align: right; padding: 0 10px;"/>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">腹部</div>
						<div class="mui-switch new2" id="mySwitch12">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="tigshow_doc_12" style="display: none;">
						<input class="ui-alert border0" id="doc_12"  placeholder="请输入" style="float: left; width:100%; text-align: right; padding: 0 10px;"/>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">四肢</div>
						<div class="mui-switch new2" id="mySwitch13">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="tigshow_doc_13" style="display: none;">
						<input class="ui-alert border0" id="doc_13"  placeholder="请输入" style="float: left; width:100%; text-align: right; padding: 0 10px;"/>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">步态</div>
						<div class="alert" id="butai_id1" style="float: right; font-size: 14px; width:50%; line-height: 26px; text-align:right;">----------------------------</div>
						<div class="mui-switch new2" id="mySwitch14" style="display: none;">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="tigshow_doc_14" style="display: none;">
						<input class="ui-alert border0" id="doc_14"  placeholder="请输入" style="float: left; width:100%; text-align: right; padding: 0 10px;"/>
					</li>
					<li class="mui-table-view-cell">
						<a data-options='{"type":"date"}' class="btn mui-navigate-right">
							<div style="float: left; font-size: 14px; width: 90px; line-height: 26px;">可疑佝偻病体症</div>
							<input id="result5" class="ui-alert" placeholder="请选择" style="width:50%;"/>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size: 14px; width:90px; line-height: 26px;">血红蛋白值</div>
						<div class="alert" id="danbai_id1" style="float: right; font-size: 14px; width:50%; line-height: 26px; text-align:right;">----------------------------</div>
						<div id="danbai_id2" style="display: none;">
							<div style="float: right; font-size: 14px; width: 50px; line-height: 26px; text-align:center;">g/L</div>
							<input id='gl' class="ui-alert border0" type="number" placeholder="" style="float:right; width:110px; text-align:center;"/>
						</div>
					</li>
				</div>
			</ul>
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-row">
					<div class="mui-col-sm-12 mui-col-xs-12">
						<li class="mui-table-view-cell">
							<div style="float: left; font-size: 14px; width:90px; line-height: 26px;">户外活动</div>
							<div style="float: right; font-size: 14px; width: 50px; line-height: 26px; text-align:center;">小时/日</div>
							<input id='outdoor' class="ui-alert border0" type="number" placeholder="" style="float:right; width:110px; text-align:center;"/>
						</li>
						<li class="mui-table-view-cell">
							<div style="float: left; font-size: 14px; width:90px; line-height: 26px;">服用维生素D</div>
							<div id="wss_class1">
								<div style="float: right; font-size: 14px; width: 50px; line-height: 26px; text-align:center;">IU/日</div>
								<input id='Vitamin' class="ui-alert border0" type="number" placeholder="" style="float:right; width:110px; text-align:center;"/>
							</div>
							<div class="alert" id="wss_class2" style="display: none; float: right; font-size: 14px; width:50%; line-height: 26px; text-align:right;">----------------------------</div>
						</li>
					</div>
				</div>
			</ul>
			<div style="clear:both; font-size: 16px; line-height:25px; margin-left:15px; margin-top: 5px;">发育评估</div>
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-col-sm-12 mui-col-xs-12">
					<li class="mui-table-view-cell">
						<ul class="mui-ul-check" id="ularry_1">
							<li value="649">呼唤名字无反应</li>
							<li value="650">不会模仿“再见”或“欢迎”动作</li>
							<li value="651">不会用拇食指对捏小物品</li>
							<li value="652">不会扶物站立</li>
						</ul>
					</li>
				</div>
			</ul>
			<div style="clear:both; font-size: 16px; line-height:25px; margin-left:15px; margin-top: 5px;">两次随访间患病情况</div>
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-col-sm-12 mui-col-xs-12">
					<li class="mui-table-view-cell">
						<ul class="mui-ul-check" id="ularry_2" style="float:left; width:40%;">
							<li style="float: none;" value="56" text="两次随访无">无</li>
							<li style="float: none;" value="565" text="肺炎">肺炎</li>
							<li style="float: none;" value="106" text="腹泻">腹泻</li>
							<li style="float: none;" value="566" text="外伤">外伤</li>
							<li style="float: none;" value="482" text="两次随访其他">其他</li>
						</ul>
						<ul class="ui-list" style="float:left; width:60%;">
							<li style="float: none;"></li>
							<li style="float: none;"><input class="ui-alert border0" id="feiyan_id"  placeholder="请输入" style="float: left; height:28px; width:100%; text-align: right; padding: 0 10px; display: none;"/></li>
							<li style="float: none;"><input class="ui-alert border0" id="fuxie_id"  placeholder="请输入" style="float: left; height:28px; width:100%; text-align: right; padding: 0 10px; display: none;"/></li>
							<li style="float: none;"><input class="ui-alert border0" id="waishang_id"  placeholder="请输入" style="float: left; height:28px; width:100%; text-align: right; padding: 0 10px; display: none;"/></li>
							<li style="float: none;"><input class="ui-alert border0" id="two_follow_id"  placeholder="请输入" style="float: left; height:28px; width:100%; text-align: right; padding: 0 10px; display: none;"/></li>
						</ul>
					</li>
					<li class="mui-table-view-cell" id="jws_id" style="display: none;">
						<input value="" id="jws" class="ui-alert bottom_soild" placeholder="请输入其他" style="width:100%; float:right; margin-right:15px;"/>
					</li>
				</div>
			</ul>
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-col-sm-12 mui-col-xs-12">
					<li class="mui-table-view-cell">
						<div style="float: left; font-size: 14px; width:90px; line-height: 26px;">其他</div>
						<input id='other' class="ui-alert border0" placeholder="" style="float:right; width:45%; text-align:center;"/>
					</li>
					<li class="mui-table-view-cell">
						<div style="float: left; font-size:16px;">转诊建议</div>
						<div class="mui-switch new1" id="mySwitch4">
						  <div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell" id="zz" style="display: none;">
						<div><span style="line-height: 30px;">原因:</span><input class="ui-alert border0" id="zz_why"  placeholder="请输入" style="width:80%; text-align: right; padding: 0 10px;"/></div>
						<div><span>科室:</span><input class="ui-alert border0" id="zz_det" placeholder="请输入" style="width:80%; text-align: right; padding: 0 10px;"/></div>
					</li>
				</div>
			</ul>
			<div style="clear:both; font-size: 16px; line-height:25px; margin-left:15px; margin-top: 5px;">指导</div>
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-col-sm-12 mui-col-xs-12">
					<li class="mui-table-view-cell">
						<ul class="mui-ul-check" id="ularry_3">
							<li value="504">科学喂养</li>
							<li value="505">生长发育</li>
							<li value="506">疾病预防</li>
							<li value="507">预防伤害</li>
							<li value="508">口腔保健</li>
							<li value="482" text ="指导其他1">其他</li>
						</ul>
					</li>
					<li class="mui-table-view-cell" id="zhidao_id1" style="display: none;">
						<input value="" id="zhidao" class="ui-alert bottom_soild" placeholder="请输入其他" style="width:100%; float:right; margin-right:15px;"/>
					</li>
				</div>
			</ul>
			<div style="clear:both; font-size: 16px; line-height:25px; margin-left:15px; margin-top: 5px;">中医服务</div>
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-col-sm-12 mui-col-xs-12" id="zhongyi_class1">
					<li class="mui-table-view-cell">
						<ul class="mui-ul-check" id="ularry_4">
							<li value="600">中医饮食调养指导</li>
							<li value="601">中医起居调摄指导</li>
							<li value="602">传授摩腹、捏脊方法</li>
							<li value="482" text ="中医其他1">其他</li>
						</ul>
					</li>
					<li class="mui-table-view-cell" id="zy_id1" style="display: none;">
						<input value="" id="zy" class="ui-alert bottom_soild" placeholder="请输入其他" style="width:100%; float:right; margin-right:15px;"/>
					</li>
				</div>
			</ul>
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-col-sm-12 mui-col-xs-12">
					<li class="mui-table-view-cell">
						<a data-options='{"type":"date"}' class="btn mui-navigate-right">
							<div style="float: left; font-size: 14px; width: 90px; line-height: 26px;">下次随访日期</div>
							<input id='result6' name="Fill_date" class="ui-alert" placeholder="请选择" style="float: right; width:50%;"/>
						</a>
					</li>
				</div>
			</ul>
			<ul class="mui-table-view" style="margin-top: 5px;">
				<div class="mui-row">
					<div class="mui-col-sm-12 mui-col-xs-12">
						<li class="mui-table-view-cell">
							<div style="float: left; font-size:16px;">医生签名</div>
							<div class="mui-switch" id="mySwitch3">
							  <div class="mui-switch-handle"></div>
							</div>
						</li>
						<li class="mui-table-view-cell" id="tigshow_doc_1">
							<a data-options='{"type":"date"}' class="btn mui-navigate-right">
								<input id='result7' class="ui-alert"  placeholder="请选择" style="width:50%; text-align: right; float: right; padding-right: 15px;"/>
							</a>
						</li>
						<li class="mui-table-view-cell" style="display: none;" id="tigshow_doc_2">
							<div style="float: left; width:100%;">
								<div style="float: left; font-size: 16px; width:5rem; text-align:center;">医院</div>
								<input id='text-doc' class="ui-alert bottom_soild"  placeholder="请输入" style="width:60%; margin-left: 6px;"/>
							</div>
							<div style="float: left; width:100%;">
								<div style="float: left; font-size: 16px; width:5rem; text-align:center;">医生</div>
								<input id='text-hosp' class="ui-alert bottom_soild"  placeholder="请输入" style="width:60%; margin-left: 6px;"/>
							</div>
						</li>
					</div>
				</div>
			</ul>
			<ul style="padding:10px 15px; margin: 0;">
				<p style="color: red; margin: 0;">
					提示：
					</br>
					若随方医生是省外的，则使用“填写”方式，手工输入随方医生信息。
					</br>
					若随方医生是省内的，则使用“选择”方式，选择对应医院和随方医生。
				</p>
			</ul>
			<div onclick="submit()" class="submit" >提交</div>
		</div>
		<script src="../../js/mui.js"></script>
		<script src="../../js/mui.picker.min.js"></script>
		<script src="../../js/jquery.min-1.11.1.js"></script>
		<script src="../../js/request.js"></script>
		<script type="text/javascript">
			var resultall = {"r1":[{value:'0',text:' '},{value:'1',text:'12月龄'},{value:'2',text:'18月龄'},{value:'3',text:'24月龄'},{value:'4',text:'30月龄'}],
			 				"r2":[{value:'0',text:' '},{value:'526',text:'上'},{value:'527',text:'中'},{value:'528',text:'下'}],
			 				"r3":[{value:'0',text:' '},{value:'114',text:'红润'},{value:'482',text:'其他'}]}
			var id = 0,
				ehrId = "", //人口表ID
				visitLevel = 3,  //1、新生儿家庭访视   2、1岁以内儿童  3、1～2岁儿童健康检查 4、3～6岁儿童健康检查 
				doctorName = "", //责任医生姓名
				visitDate = "",  //本次随访日期
				nextDate = "", //下次随访日期
				createUser = "", //创建账号ID
				updateUser = "", //修改账号ID
				createDate = "", //创建日期
				updateDate = "", //修改日期
				enableFlag = 1, //状态 1：正常 3：删除
				doctorId = "", //责任医生员工ID
				doctorHospId = "", //随访医生归属医院ID
				ageMonth = "", //随访月龄 VISIT_LEVEL=1时 0表示新生儿 ；VISIT_LEVEL=2时 1为满月 2为3月龄 3为6月龄 4为8月龄；VISIT_LEVEL=3时  1为12月龄 2为18月龄 3为24月龄 4为30月龄；VISIT_LEVEL=4时 1为3岁 2为4岁 3为5岁 4为6岁 
				doctorHospName = "", //责任医生所属医院
				kindergarten = "", //集体体检时幼儿园名称
				xkSign = null, //所属系统标识
				versionNum = 2018, //版本号
				readcardCheck = 2;
			var listdata = "";
			var selfdata = "";
			var result0 = "",
				result1 = "",
				result2 = "",
				result3 = "0",
				result4 = "0",
				result5 = "0",
				result6 = "0",
				result7 = "0";
			var newdate = new Date();
			var self1 = localStorage.getItem("name")
			var dataself = JSON.parse(self1)
			console.log(dataself)
			doctorName = dataself.obj.userName;//责任(评估)医生名字
			doctorId = dataself.obj.id;//责任(评估)医生id
			doctorHospId = dataself.obj.hospId;//责任(评估)医生医院id
			createHospId = dataself.obj.hospId;//创建医院id
			doctorHospName = dataself.obj.hospName;//责任(评估)医生医院名称
			document.getElementById("result7").value = dataself.obj.userName;//前台显示
			mui.plusReady(function(){
				var self = plus.webview.currentWebview()
					listdata = self.data
					selfdata = JSON.parse(listdata)
					console.log(JSON.stringify(selfdata))
					//赋值
				var date1 = new Date();
				var year1=date1.getFullYear(); 
				var month1=date1.getMonth()+1;
				var day1=date1.getDate();
				var h1=date1.getHours();
				var m1=date1.getMinutes();
				var s1=date1.getSeconds();
					month1 =(month1<10 ? "0"+month1:month1); 
					day1 =(day1<10 ? "0"+day1:day1); 
					h1 =(h1<10 ? "0"+h1:h1); 
					m1 =(m1<10 ? "0"+m1:m1); 
					s1 =(s1<10 ? "0"+s1:s1);
				var newDate = (year1.toString()+'-'+month1.toString()+'-'+day1.toString()+' '+h1.toString()+':'+m1.toString()+':'+s1.toString())
					ehrId = selfdata.ehrId
					if(selfdata.id != undefined){
						$("#result0").attr("disabled","disabled");
						$("#result0").parent().css("pointer-events","none");
						id = selfdata.id;
						//月龄
						var rowsresult=resultall.r1;
						for (var j=0; j<rowsresult.length; j++) {
							if(selfdata.ageMonth == rowsresult[j].value){
								document.getElementById("result0").value = rowsresult[j].text;
							}
						}
						if(selfdata.ageMonth == "2"){
							document.getElementById("ql_class1").style.display="none";
							document.getElementById("result5").style.display="block";
							document.getElementById("mySwitch6").style.display="block";
							document.getElementById("tl_class1").style.display="block";
							document.getElementById("mySwitch10").style.display="none";
							document.getElementById("butai_id1").style.display="none";
							document.getElementById("mySwitch14").style.display="block";
							document.getElementById("danbai_id1").style.display="block";
							document.getElementById("danbai_id2").style.display="none";
							document.getElementById("wss_class1").style.display="block";
							document.getElementById("wss_class2").style.display="none";
							addlist2() ;
							arr_pop5.length = 0;
							arr_pop5.push({value:'56',text:'无'},{value:'517',text:'助串珠'},{value:'519',text:'助软骨沟'},{value:'520',text:'鸡胸'},{value:'521',text:'手足镯'},{value:'522',text:'O型腿'},{value:'555',text:'X型腿'});
						}else if(selfdata.ageMonth == "3" || selfdata.ageMonth == "4"){
							if(selfdata.ageMonth == "3"){
								arr_pop5.length = 0;
								arr_pop5.push({value:'56',text:'无'},{value:'517',text:'助串珠'},{value:'519',text:'助软骨沟'},{value:'520',text:'鸡胸'},{value:'521',text:'手足镯'},{value:'522',text:'O型腿'},{value:'555',text:'X型腿'});
								document.getElementById("ql_class1").style.display="none";
								document.getElementById("mySwitch6").style.display="block";
								document.getElementById("result5").style.display="block";
								document.getElementById("tl_class1").style.display="none";
								document.getElementById("mySwitch10").style.display="block";
								document.getElementById("butai_id1").style.display="none";
								document.getElementById("mySwitch14").style.display="block";
								document.getElementById("danbai_id1").style.display="block";
								document.getElementById("danbai_id2").style.display="none";
								document.getElementById("wss_class1").style.display="block";
								document.getElementById("wss_class2").style.display="none";
								addlist3();
							}else if(selfdata.ageMonth == "4"){
								arr_pop5.length = 0;
								document.getElementById("ql_class1").style.display="block";
								document.getElementById("result5").style.display="none";
								document.getElementById("mySwitch6").style.display="none";
								document.getElementById("tl_class1").style.display="block";
								document.getElementById("mySwitch10").style.display="none";
								document.getElementById("butai_id1").style.display="none";
								document.getElementById("mySwitch14").style.display="block";
								document.getElementById("danbai_id1").style.display="none";
								document.getElementById("danbai_id2").style.display="block";
								document.getElementById("wss_class1").style.display="none";
								document.getElementById("wss_class2").style.display="block";
								$('#Vitamin')[0].value = "";
								addlist4();
							}
						}
						if(selfdata.visitDate != ""){//随访日期
							var datev = new Date(selfdata.visitDate);
							var yearv=datev.getFullYear(); 
							var monthv=datev.getMonth()+1;
							var dayv=datev.getDate();
								monthv =(monthv<10 ? "0"+monthv:monthv); 
								dayv =(dayv<10 ? "0"+dayv:dayv); 
							var datab = (yearv.toString()+'-'+monthv.toString()+'-'+dayv.toString());
							document.getElementById("result1").value = datab;
						}else{
							document.getElementById("result1").value = "";
						}
						if(selfdata.nextDate != ""){//下次随访日期
							var datev = new Date(selfdata.nextDate);
							var yearv=datev.getFullYear(); 
							var monthv=datev.getMonth()+1;
							var dayv=datev.getDate();
								monthv =(monthv<10 ? "0"+monthv:monthv); 
								dayv =(dayv<10 ? "0"+dayv:dayv); 
							var datab = (yearv.toString()+'-'+monthv.toString()+'-'+dayv.toString());
							document.getElementById("result6").value = datab;
						}else{
							document.getElementById("result6").value = "";
						}
						doctorName = selfdata.doctorName;
						visitItem = selfdata.visitItem;
						createUser = selfdata.createUser;
						updateUser = selfdata.updateUser;
						createDate = selfdata.createDate;
						updateDate = selfdata.updateDate;
						doctorId = selfdata.doctorId;
						doctorHospId = selfdata.doctorHospId;
						doctorHospName = selfdata.doctorHospName;
						mui.ajax(getRequestUrl.url+'/mobile/ehr/childHealthAnswer/getVisitDetail',{
							data:{
								"m_id":id,
								"ehr_id":ehrId
							},
							dataType:'json',//服务器返回json格式数据
							type:'post',//HTTP请求类型
							timeout:10000,//超时时间设置为10秒；
							success:function(data){
								console.log("获取成功")
								var rows = data.rows;
								console.log(JSON.stringify(rows))
								if (data.status == 1) {
									for(var i=0; i<rows.length; i++){
										if(rows[i].questionId == "89"){//体重
											document.getElementById("kg").value = rows[i].answer;
										}
										if(rows[i].questionId == "666"){//体重发育情况
											var rowsresult2=resultall.r2;
											for (var j=0; j<rowsresult2.length; j++) {
												if(rows[i].answerId == rowsresult2[j].value){
													document.getElementById("result2").value = rowsresult2[j].text;
												}
											}
										}
										if(rows[i].questionId == "88"){//身长
											document.getElementById("cm").value = rows[i].answer;
										}
										if(rows[i].questionId == "667"){//身长发育情况
											var rowsresult2=resultall.r2;
											for (var j=0; j<rowsresult2.length; j++) {
												if(rows[i].answerId == rowsresult2[j].value){
													document.getElementById("result3").value = rowsresult2[j].text;
												}
											}
										}
										if(rows[i].questionId == "401"){//面色
											var rowsresult2=resultall.r3;
											for (var j=0; j<rowsresult2.length; j++) {
												if(rows[i].answerId == rowsresult2[j].value){
													document.getElementById("result4").value = rowsresult2[j].text;
												}
											}
										}
										if(rows[i].questionId == "110"){//皮肤
											if(rows[i].answerId != "180"){
												mySwitch5 = "181";
												document.getElementById("tigshow_doc_5").style.display = "block";
												document.getElementById("mySwitch5").classList.add('mui-active');
											}else{
												document.getElementById("tigshow_doc_5").style.display = "none";
												document.getElementById("mySwitch5").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "111"){//皮肤1
											document.getElementById("doc_5").value = rows[i].answer;
										}
										if(rows[i].questionId == "661"){//前卤
											if(rows[i].answerId != "509"){
												mySwitch6 = "510";
												document.getElementById("tigshow_doc_6").style.display = "block";
												document.getElementById("mySwitch6").classList.add('mui-active');
											}else{
												document.getElementById("tigshow_doc_6").style.display = "none";
												document.getElementById("mySwitch6").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "403"){//前卤1
											document.getElementById("front_1").value = rows[i].answer;
										}
										if(rows[i].questionId == "404"){//前卤2
											document.getElementById("front_2").value = rows[i].answer;
										}
										if(rows[i].questionId == "406"){//眼睛
											if(rows[i].answerId != "180"){
												mySwitch8 = "181";
												document.getElementById("tigshow_doc_8").style.display = "block";
												document.getElementById("mySwitch8").classList.add('mui-active');
											}else{
												document.getElementById("tigshow_doc_8").style.display = "none";
												document.getElementById("mySwitch8").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "407"){//眼睛1
											document.getElementById("doc_8").value = rows[i].answer;
										}
										if(rows[i].questionId == "410"){//耳
											if(rows[i].answerId != "180"){
												mySwitch9 = "181";
												document.getElementById("tigshow_doc_9").style.display = "block";
												document.getElementById("mySwitch9").classList.add('mui-active');
											}else{
												document.getElementById("tigshow_doc_9").style.display = "none";
												document.getElementById("mySwitch9").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "411"){//耳1
											document.getElementById("doc_9").value = rows[i].answer;
										}
										if(rows[i].questionId == "107"){//听力
											if(rows[i].answerId != "326"){
												mySwitch10 = "327";
												document.getElementById("mySwitch10").classList.add('mui-active');
											}else{
												document.getElementById("mySwitch10").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "433"){//出牙数1
											document.getElementById("tooth1").value = rows[i].answer;
										}
										if(rows[i].questionId == "663"){//出牙数2
											document.getElementById("tooth2").value = rows[i].answer;
										}
										if(rows[i].questionId == "749"){//胸部
											if(rows[i].answerId != "180"){
												mySwitch11 = "181";
												document.getElementById("tigshow_doc_11").style.display = "block";
												document.getElementById("mySwitch11").classList.add('mui-active');
											}else{
												document.getElementById("tigshow_doc_11").style.display = "none";
												document.getElementById("mySwitch11").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "750"){//胸部1
											document.getElementById("doc_11").value = rows[i].answer;
										}
										if(rows[i].questionId == "424"){//腹部
											if(rows[i].answerId != "180"){
												mySwitch12 = "181";
												document.getElementById("tigshow_doc_12").style.display = "block";
												document.getElementById("mySwitch12").classList.add('mui-active');
											}else{
												document.getElementById("tigshow_doc_12").style.display = "none";
												document.getElementById("mySwitch12").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "425"){//腹部1
											document.getElementById("doc_12").value = rows[i].answer;
										}
										if(rows[i].questionId == "408"){//四肢
											if(rows[i].answerId != "180"){
												mySwitch13 = "181";
												document.getElementById("tigshow_doc_13").style.display = "block";
												document.getElementById("mySwitch13").classList.add('mui-active');
											}else{
												document.getElementById("tigshow_doc_13").style.display = "none";
												document.getElementById("mySwitch13").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "409"){//四肢1
											document.getElementById("doc_13").value = rows[i].answer;
										}
										if(rows[i].questionId == "664"){//步态
											if(rows[i].answerId != "180"){
												mySwitch14 = "181";
												document.getElementById("tigshow_doc_14").style.display = "block";
												document.getElementById("mySwitch14").classList.add('mui-active');
											}else{
												document.getElementById("tigshow_doc_14").style.display = "none";
												document.getElementById("mySwitch14").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "665"){//步态1
											document.getElementById("doc_14").value = rows[i].answer;
										}
										if(rows[i].questionId == "435"){//可疑佝偻病体症
											var rowsresult2=arr_pop5;
											for (var j=0; j<rowsresult2.length; j++) {
												if(rows[i].answerId == rowsresult2[j].value){
													document.getElementById("result5").value = rowsresult2[j].text;
												}
											}
										}
										if(rows[i].questionId == "161"){//血红蛋白值
											document.getElementById("gl").value = rows[i].answer;
										}
										if(rows[i].questionId == "436"){//户外活动
											document.getElementById("outdoor").value = rows[i].answer;
										}
										if(rows[i].questionId == "437"){//服用维生素D
											document.getElementById("Vitamin").value = rows[i].answer;
										}
										if(rows[i].questionId == "438"){//发育评估
											var select1Ynarr = rows[i].answer;
											if(select1Ynarr != null){
												var select1Ynarr_n = select1Ynarr.split(",");
												if(select1Ynarr_n.length != 0){
													$ ("#ularry_1").each (function (){
														$ (this).find ('li').each (function (){
															var y = select1Ynarr_n.length-1;
															for (var i=0; i<select1Ynarr_n.length; i++) {
																if ($(this).val() == select1Ynarr_n[i]) {
											                        $(this).addClass("on");
											                    }		
															}
														})
													})	
												}
											}
										}
										if(rows[i].questionId == "439"){//两次随访间患病情况
											var select1Ynarr = rows[i].answer;
											if(select1Ynarr != null){
												var select1Ynarr_n = select1Ynarr.split(",");
												if(select1Ynarr_n.length != 0){
													$ ("#ularry_2").each (function (){
														$ (this).find ('li').each (function (){
															for (var i=0; i<select1Ynarr_n.length; i++) {
																if ($(this).val() == select1Ynarr_n[i]) {
											                        $(this).addClass("on");
																	if(select1Ynarr_n[i] == "565"){
																		$("#feiyan_id").show();
																	}else if(select1Ynarr_n[i] == "106"){
																		$("#fuxie_id").show();
																	}else if(select1Ynarr_n[i] == "566"){
																		$("#waishang_id").show();
																	}else if(select1Ynarr_n[i] == "482"){
																		$("#two_follow_id").show();
																	}
											                    }		
															}
														})
													})	
												}
											}
										}
										if(rows[i].questionId == "443"){//两次随访间肺炎1
											document.getElementById("feiyan_id").value = rows[i].answer;
										}
										if(rows[i].questionId == "444"){//两次随访间腹泻1
											document.getElementById("fuxie_id").value = rows[i].answer;
										}
										if(rows[i].questionId == "445"){//两次随访间外伤1
											document.getElementById("waishang_id").value = rows[i].answer;
										}
										if(rows[i].questionId == "446"){//两次随访间其他1
											document.getElementById("two_follow_id").value = rows[i].answer;
										}
										if(rows[i].questionId == "440"){//其他
											document.getElementById("other").value = rows[i].answer;
										}
										if(rows[i].questionId == "332"){//转诊
											if(rows[i].answerId != "56"){
												mySwitch15 = "55";
												document.getElementById("zz").style.display = "block";
												document.getElementById("mySwitch4").classList.add('mui-active');
											}else{
												document.getElementById("zz").style.display = "none";
												document.getElementById("mySwitch4").classList.remove('mui-active');
											}
										}
										if(rows[i].questionId == "333"){//原因
											document.getElementById("zz_why").value = rows[i].answer;
										}
										if(rows[i].questionId == "334"){//科室
											document.getElementById("zz_det").value = rows[i].answer;
										}
										if(rows[i].questionId == "430"){//指导
											var select4Ynarr = rows[i].answer;
											if(select4Ynarr != null){
												var select4Ynarr_n = select4Ynarr.split(",");
												if(select4Ynarr_n.length != 0){
													$ ("#ularry_3").each (function (){
														$ (this).find ('li').each (function (){
															var y = select4Ynarr_n.length-1;
															for (var i=0; i<select4Ynarr_n.length; i++) {
																if ($(this).val() == select4Ynarr_n[i]) {
											                        $(this).addClass("on");
																	if(select4Ynarr_n[y] == "482"){
																		document.getElementById("zhidao_id1").style.display="block";
																	}else{
																		document.getElementById("zhidao_id1").style.display="none";
																	}
											                    }		
															}
														})
													})	
												}
											}
										}
										if(rows[i].questionId == "668"){//指导其他
											document.getElementById("zhidao").value = rows[i].answer;
										}
										if(rows[i].questionId == "735"){//中医
											var select5Ynarr = rows[i].answer;
											if(select5Ynarr != null){
												var select5Ynarr_n = select5Ynarr.split(",");
												if(select5Ynarr_n.length != 0){
													$ ("#ularry_4").each (function (){
														$ (this).find ('li').each (function (){
															var y = select5Ynarr_n.length-1;
															for (var i=0; i<select5Ynarr_n.length; i++) {
																if ($(this).val() == select5Ynarr_n[i]) {
											                        $(this).addClass("on");
																	if(select5Ynarr_n[y] == "482"){
																		document.getElementById("zy_id1").style.display="block";
																	}else{
																		document.getElementById("zy_id1").style.display="none";
																	}
											                    }		
															}
														})
													})	
												}
											}
										}
										if(rows[i].questionId == "736"){//中医其他
											document.getElementById("zy").value = rows[i].answer;
										}
									}
								} else {
									
								}
							},
							error:function(xhr,type,errorThrown){
								
							}
						});	
					}else{
						visitDate = newDate;//随访时间
						doctorName = dataself.obj.userName;
						createUser = dataself.obj.id;
						updateUser = dataself.obj.id;
						createDate = newDate;
						updateDate = newDate;
						doctorId = dataself.obj.id;
						doctorHospId = dataself.obj.hospId;
						doctorHospName = dataself.obj.hospName;
					};
			});	
			//内容字段部分
			mui.init()
				(function($) {
				$.init();
				var result = $('#result')[0];
				var btns = $('.btn');
				btns.each(function(i, btn) {
					arr_pop5 =[{value:'56',text:'无'},{value:'517',text:'助串珠'},{value:'519',text:'助软骨沟'},{value:'520',text:'鸡胸'},{value:'521',text:'手足镯'},{value:'522',text:'O型腿'},{value:'555',text:'X型腿'}];
					
					btn.addEventListener('tap', function() {
						var _self = this;
						if(_self.picker) {
							_self.picker.show(function (rs) {
								result.innerText = rs.text;
								_self.picker.dispose();
								_self.picker = null;
							});
						} else {
							if(i == 0){
								var picker = new mui.PopPicker();
								picker.setData([{value:'1',text:'12月龄'},{value:'2',text:'18月龄'},{value:'3',text:'24月龄'},{value:'4',text:'30月龄'}]);
								picker.show(function (selectItems) {
									$('#result'+i)[0].value = selectItems[0].text;
									if(selectItems[0].text == '12月龄'){
										document.getElementById("ql_class1").style.display="none";
										document.getElementById("result5").style.display="block";
										document.getElementById("mySwitch6").style.display="block";
										document.getElementById("tl_class1").style.display="none";
										document.getElementById("mySwitch10").style.display="block";
										document.getElementById("butai_id1").style.display="block";
										document.getElementById("mySwitch14").style.display="none";
										$('#doc_14')[0].value = "";
										document.getElementById("danbai_id1").style.display="block";
										document.getElementById("danbai_id2").style.display="none";
										$('#danbai_id_input')[0].value = "";
										document.getElementById("wss_class1").style.display="block";
										document.getElementById("wss_class2").style.display="none";
										addlist1();
										arr_pop5.length = 0;
										arr_pop5.push({value:'56',text:'无'},{value:'517',text:'助串珠'},{value:'519',text:'助软骨沟'},{value:'520',text:'鸡胸'},{value:'521',text:'手足镯'},{value:'522',text:'O型腿'},{value:'555',text:'X型腿'});
									}else if(selectItems[0].text == '18月龄'){
										document.getElementById("ql_class1").style.display="none";
										document.getElementById("result5").style.display="block";
										document.getElementById("mySwitch6").style.display="block";
										document.getElementById("tl_class1").style.display="block";
										document.getElementById("mySwitch10").style.display="none";
										document.getElementById("butai_id1").style.display="none";
										document.getElementById("mySwitch14").style.display="block";
										document.getElementById("danbai_id1").style.display="block";
										document.getElementById("danbai_id2").style.display="none";
										document.getElementById("wss_class1").style.display="block";
										document.getElementById("wss_class2").style.display="none";
										addlist2() ;
										arr_pop5.length = 0;
										arr_pop5.push({value:'56',text:'无'},{value:'517',text:'助串珠'},{value:'519',text:'助软骨沟'},{value:'520',text:'鸡胸'},{value:'521',text:'手足镯'},{value:'522',text:'O型腿'},{value:'555',text:'X型腿'});
									}else if(selectItems[0].text == '24月龄' || selectItems[0].text == '30月龄'){
										if(selectItems[0].text == '30月龄'){
										 	arr_pop5.length = 0;
											document.getElementById("ql_class1").style.display="block";
											document.getElementById("result5").style.display="none";
											document.getElementById("mySwitch6").style.display="none";
											document.getElementById("tl_class1").style.display="block";
											document.getElementById("mySwitch10").style.display="none";
											document.getElementById("butai_id1").style.display="none";
											document.getElementById("mySwitch14").style.display="block";
											document.getElementById("danbai_id1").style.display="none";
											document.getElementById("danbai_id2").style.display="block";
											document.getElementById("wss_class1").style.display="none";
											document.getElementById("wss_class2").style.display="block";
											$('#Vitamin')[0].value = "";
											addlist4();
										}else{
											arr_pop5.length = 0;
											arr_pop5.push({value:'56',text:'无'},{value:'517',text:'助串珠'},{value:'519',text:'助软骨沟'},{value:'520',text:'鸡胸'},{value:'521',text:'手足镯'},{value:'522',text:'O型腿'},{value:'555',text:'X型腿'});
											document.getElementById("ql_class1").style.display="none";
											document.getElementById("mySwitch6").style.display="block";
											document.getElementById("result5").style.display="block";
											document.getElementById("tl_class1").style.display="none";
											document.getElementById("mySwitch10").style.display="block";
											document.getElementById("butai_id1").style.display="none";
											document.getElementById("mySwitch14").style.display="block";
											document.getElementById("danbai_id1").style.display="block";
											document.getElementById("danbai_id2").style.display="none";
											document.getElementById("wss_class1").style.display="block";
											document.getElementById("wss_class2").style.display="none";
											addlist3();
										}
									} 
								})
							}else if(i == 2){
								var picker = new mui.PopPicker();
								picker.setData([{value:'526',text:'上'},{value:'527',text:'中'},{value:'528',text:'下'}]);
								picker.show(function (selectItems) {
									$('#result'+i)[0].value = selectItems[0].text;
								})
							}else if(i == 3){
								var picker = new mui.PopPicker();
								picker.setData([{value:'526',text:'上'},{value:'527',text:'中'},{value:'528',text:'下'}]);
								picker.show(function (selectItems) {
									$('#result'+i)[0].value = selectItems[0].text;
								})
							}else if(i == 4){
								var picker = new mui.PopPicker();
								 picker.setData([{value:'114',text:'红润'},{value:'482',text:'其他'}]);
								 picker.show(function (selectItems) {
									$('#result'+i)[0].value = selectItems[0].text;
								  })
							}else if(i == 5){
								var picker = new mui.PopPicker();
								picker.setData(arr_pop5);
								picker.show(function (selectItems) {
									$('#result'+i)[0].value = selectItems[0].text;
								})
							}else if(i == 7){
								var picker = new mui.PopPicker();
								 picker.setData([{value:dataself.obj.id,text:dataself.obj.userName}]);
								 picker.show(function (selectItems) {
									 $('#result'+i)[0].value = selectItems[0].text;
								  })
							}else{
								var optionsJson = this.getAttribute('data-options') || '{}';
								var options = JSON.parse(optionsJson);
								var id = this.getAttribute('id');
								/*
								 * 首次显示时实例化组件
								 * 示例为了简洁，将 options 放在了按钮的 dom 上
								 * 也可以直接通过代码声明 optinos 用于实例化 DtPicker
								 */
								_self.picker = new $.DtPicker(options);
								_self.picker.show(function(rs) {
									/*
									 * rs.value 拼合后的 value
									 * rs.text 拼合后的 text
									 * rs.y 年，可以通过 rs.y.vaue 和 rs.y.text 获取值和文本
									 * rs.m 月，用法同年
									 * rs.d 日，用法同年
									 * rs.h 时，用法同年
									 * rs.i 分（minutes 的第二个字母），用法同年
									 */
									$('#result'+i)[0].value = rs.text;
									/* 
									 * 返回 false 可以阻止选择框的关闭
									 * return false;
									 */
									/*
									 * 释放组件资源，释放后将将不能再操作组件
									 * 通常情况下，不需要示放组件，new DtPicker(options) 后，可以一直使用。
									 * 当前示例，因为内容较多，如不进行资原释放，在某些设备上会较慢。
									 * 所以每次用完便立即调用 dispose 进行释放，下次用时再创建新实例。
									 */
									_self.picker.dispose();
									_self.picker = null;
								});
							}
						}
					}, false);
				});
			})(mui);
			//切换
			document.getElementById("mySwitch3").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_1").style.display="none";
					document.getElementById("tigshow_doc_2").style.display="block";
					doctorHospId = "0";//签名医生医院id
					doctorHospName = document.getElementById("text-hosp").value;//签名医生医院名字
					doctorId = "0";//签名医生id
					doctorName = document.getElementById("text-doc").value;//签名医生姓名
				}else{
					document.getElementById("tigshow_doc_1").style.display="block";
					document.getElementById("tigshow_doc_2").style.display="none";
					if(doctorId == ""){
						doctorHospId = "";//签名医生医院id
						doctorHospName = "";//签名医生医院名字
						doctorId = "";//签名医生id
						doctorName = "";//签名医生姓名
					}
				}
			})
			//切换
			var mySwitch4 = "56",
				mySwitch5 = "180",
				mySwitch6 = "509",
				mySwitch8 = "180",
				mySwitch9 = "180",
				mySwitch10 = "326",
				mySwitch11 = "180",
				mySwitch12 = "180",
				mySwitch13 = "180",
				mySwitch14 = "180";
			document.getElementById("mySwitch4").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_4").style.display="block";
					mySwitch4 = "55";
				}else{
					document.getElementById("tigshow_doc_4").style.display="none";
					mySwitch4 = "56";
					$("#doc_4").val("");
				}
			})
			document.getElementById("mySwitch5").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_5").style.display="block";
					mySwitch5 = "181";
				}else{
					document.getElementById("tigshow_doc_5").style.display="none";
					mySwitch5 = "180";
					$("#doc_5").val("");
				}
			})
			document.getElementById("mySwitch6").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_6").style.display="block";
					mySwitch6 = "510";
				}else{
					document.getElementById("tigshow_doc_6").style.display="none";
					mySwitch6 = "509";
					$("#cm").val("");
				}
			})
			document.getElementById("mySwitch8").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_8").style.display="block";
					mySwitch8 = "181";
				}else{
					document.getElementById("tigshow_doc_8").style.display="none";
					mySwitch8 = "180";
					$("#doc_8").val("");
				}
			})
			document.getElementById("mySwitch9").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_9").style.display="block";
					mySwitch9 = "181";
				}else{
					document.getElementById("tigshow_doc_9").style.display="none";
					mySwitch9 = "180";
					$("#doc_9").val("");
				}
			})
			document.getElementById("mySwitch10").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_10").style.display="block";
					mySwitch10 = "327";
				}else{
					document.getElementById("tigshow_doc_10").style.display="none";
					mySwitch10 = "326";
					$("#doc_10").val("");
				}
			})
			document.getElementById("mySwitch11").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_11").style.display="block";
					mySwitch11 = "181";
				}else{
					document.getElementById("tigshow_doc_11").style.display="none";
					mySwitch11 = "180";
					$("#doc_11").val("");
				}
			})
			document.getElementById("mySwitch12").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_12").style.display="block";
					mySwitch12 = "181";
				}else{
					document.getElementById("tigshow_doc_12").style.display="none";
					mySwitch12 = "180";
					$("#doc_12").val("");
				}
			})
			document.getElementById("mySwitch13").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_13").style.display="block";
					mySwitch13 = "181";
				}else{
					document.getElementById("tigshow_doc_13").style.display="none";
					mySwitch13 = "180";
					$("#doc_13").val("");
				}
			})
			document.getElementById("mySwitch14").addEventListener("toggle",function(event){
				if(event.detail.isActive){
					document.getElementById("tigshow_doc_14").style.display="block";
					mySwitch14 = "181";
				}else{
					document.getElementById("tigshow_doc_14").style.display="none";
					mySwitch14 = "180";
					$("#doc_14").val("");
				}
			})
			var addlist0,addlist1,addlist2,addlist3,addlist4;
			function addlist0(){
				$('#ularry_1').children("").remove();
				$('#ularry_3').children("").remove();
				$('#ularry_4').children("").remove();
			}
			function addlist1(){
				addlist0();
				$('#ularry_1').append("<li value='649'>呼唤名字无反应</li><li value='650'>不会模仿“再见”或“欢迎”动作</li><li value='651'>不会用拇食指对捏小物品</li><li value='652'>不会扶物站立</li>");
				$('#ularry_3').append('<li value="504">科学喂养</li><li value="505">生长发育</li><li value="506">疾病预防</li><li value="507">预防伤害</li><li value="508">口腔保健</li><li value="482" text ="指导其他1">其他</li>');
				$('#ularry_4').append("<li value='600'>中医饮食调养指导</li><li value='601'>中医起居调摄指导</li><li value='602'>传授摩腹、捏脊方法</li><li value='482' text ='中医其他1'>其他</li>");
			}
			function addlist2(){
				addlist0();
				$('#ularry_1').append("<li value='653'>不会有意识的叫“爸爸”或“妈妈”</li><li value='654'>不会按要求指人或物</li><li value='655'>与人无目光交流</li><li value='656'>不会独走</li>");
				$('#ularry_3').append('<li value="504">科学喂养</li><li value="505">生长发育</li><li value="506">疾病预防</li><li value="507">预防伤害</li><li value="508">口腔保健</li><li value="482" text ="指导其他1">其他</li>');
				$('#ularry_4').append("<li value='600'>中医饮食调养指导</li><li value='601'>中医起居调摄指导</li><li value='603'>传授按揉迎香穴、足三里穴方法</li><li value='482' text ='中医其他1'>其他</li>");
			}
			function addlist3(){
				addlist0();
				$('#ularry_1').append("<li value='657'>不会说3个物品的名称</li><li value='658'>不会按吩咐做简单事情</li><li value='659'>不会用勺吃饭</li><li value='660'>不会扶栏上楼梯/台阶</li>");
				$('#ularry_3').append('<li value="504">合理膳食</li><li value="505">生长发育</li><li value="506">疾病预防</li><li value="507">预防伤害</li><li value="508">口腔保健</li><li value="482" text ="指导其他1">其他</li>');
				$('#ularry_4').append("<li value='600'>中医饮食调养指导</li><li value='601'>中医起居调摄指导</li><li value='603'>传授按揉迎香穴、足三里穴方法</li><li value='482' text ='中医其他1'>其他</li>");
			}
			function addlist4(){
				addlist0();
				$('#ularry_1').append("<li value='661'>不会说2-3个字的短语</li><li value='662'>兴趣单一、刻板</li><li value='663'>不会示意大小便</li><li value='664'>不会跑</li>");
				$('#ularry_3').append('<li value="504">合理膳食</li><li value="505">生长发育</li><li value="506">疾病预防</li><li value="507">预防伤害</li><li value="508">口腔保健</li><li value="482" text ="指导其他1">其他</li>');
				$('#ularry_4').append("<li value='600'>中医饮食调养指导</li><li value='601'>中医起居调摄指导</li><li value='604'>传授按揉四神聪穴方法</li><li value='482' text ='中医其他1'>其他</li>");
			}
			//复选框事件
			mui('.mui-ul-check').on('tap', 'li', function(e) {
				var text = this.getAttribute('text');
				var id = this.getAttribute('id');
				var remove_class = this.getAttribute('class');
				if(!this.getAttribute('class')){
					this.classList.add('on');
					if(text == "指导其他1"){
						$("#zhidao_id1").show();
					}else if(text == "中医其他1"){
						$("#zy_id1").show();
					}else if(text == "肺炎"){
						$("#feiyan_id").show();
						$(this).parent().find("li").eq(0).removeClass('on')
					}else if(text == "腹泻"){
						$("#fuxie_id").show();
						$(this).parent().find("li").eq(0).removeClass('on')
					}else if(text == "外伤"){
						$("#waishang_id").show();
						$(this).parent().find("li").eq(0).removeClass('on')
					}else if(text == "两次随访其他"){
						$("#two_follow_id").show();
						$(this).parent().find("li").eq(0).removeClass('on')
					}else if(text == "两次随访无"){
						$("#feiyan_id").hide();
						$("#fuxie_id").hide();
						$("#waishang_id").hide();
						$("#two_follow_id").hide();
						$(this).siblings().removeClass('on');
					}
				}else{
					this.classList.remove('on');
					if(text == "指导其他1" && remove_class){
						$("#zhidao_id1").hide();
						$('#zhidao')[0].value = "";
					}else if(text == "中医其他1" && remove_class){
						$("#zy_id1").hide();
						$('#zy')[0].value = ""
					}else if(text == "肺炎" && remove_class){
						$("#feiyan_id").hide();
						$('#feiyan_id')[0].value = "";
					}else if(text == "腹泻" && remove_class){
						$("#fuxie_id").hide();
						$('#fuxie_id')[0].value = "";
					}else if(text == "外伤" && remove_class){
						$("#waishang_id").hide();
						$('#waishang_id')[0].value = "";
					}else if(text == "两次随访其他" && remove_class){
						$("#two_follow_id").hide();
						$('#two_follow_id')[0].value = "";
					}else if(text == "两次随访无" && remove_class){
						$('#feiyan_id')[0].value = "";
						$('#fuxie_id')[0].value = "";
						$('#waishang_id')[0].value = "";
						$('#two_follow_id')[0].value = "";
					}
				}
			});
			//提交
			var select1 = "",
				select2 = "",
				select3 = "",
				select4 = "";
			function submit(){
				if($("#result0")[0].value == ""){
					alert("请输入月龄");
				}else if($("#result1")[0].value == ""){
					alert("请输入随访时间");
				}else if($("#result6")[0].value == ""){
					alert("请输入下次随访时间");
				}else if($("#result7")[0].value == "" && $("#text-doc")[0].value == ""){
					alert("请输入医生签名");
				}else{
					alert("可以提交");
					if($("#result1")[0].value != ""){
						visitDate = $("#result1")[0].value+" 00:00:00";
					}else{
						visitDate = "";
					}
					if($("#result6")[0].value != ""){
						nextDate = $("#result6")[0].value+" 00:00:00";
					}else{
						nextDate = "";
					}
					var result0_arr = $('#result0')[0].value;
					for(var re=0; re<resultall.r1.length; re++){
						if(result0_arr == resultall.r1[re].text){
							ageMonth = resultall.r1[re].value;//月龄
						};
					};
					var result2_arr = $('#result2')[0].value;
					for(var re=0; re<resultall.r2.length; re++){
						if(result2_arr == resultall.r2[re].text){
							result2 = resultall.r2[re].value;//体重情况
						};
					};
					var result3_arr = $('#result3')[0].value;
					for(var re=0; re<resultall.r2.length; re++){
						if(result3_arr == resultall.r2[re].text){
							result3 = resultall.r2[re].value;//身长情况
						};
					};
					var result4_arr = $('#result4')[0].value;
					for(var re=0; re<resultall.r3.length; re++){
						if(result4_arr == resultall.r3[re].text){
							result4 = resultall.r3[re].value;//面色
						};
					};
					var result5_arr = $('#result5')[0].value;
					for(var re=0; re<arr_pop5.length; re++){
						if(result5_arr == arr_pop5[re].text){
							result5 = arr_pop5[re].value;//可疑佝偻病症状
						};
					};
					//多选1
					select1 = "";
					$ ("#ularry_1").find ('.on').each (function (){
						if($(this).length != 0){
							select1 += $(this).val() + ",";	
						}
					});
					//去掉最后一个逗号(如果不需要去掉，就不用写)
					if (select1.length > 0) {
						select1 = select1.substr(0,select1.length - 1);
					}else{
						select1 = "";
					}
					//多选2
					select2 = "";
					$ ("#ularry_2").find ('.on').each (function (){
						if($(this).length != 0){
							select2 += $(this).val() + ",";	
						}
					});
					//去掉最后一个逗号(如果不需要去掉，就不用写)
					if (select2.length > 0) {
						select2 = select2.substr(0,select2.length - 1);
					}else{
						select2 = "";
					}
					//多选3
					select3 = "";
					$ ("#ularry_3").find ('.on').each (function (){
						if($(this).length != 0){
							select3 += $(this).val() + ",";	
						}
					});
					//去掉最后一个逗号(如果不需要去掉，就不用写)
					if (select3.length > 0) {
						select3 = select3.substr(0,select3.length - 1);
					}else{
						select3 = "";
					}
					//多选4
					select4 = "";
					$ ("#ularry_4").find ('.on').each (function (){
						if($(this).length != 0){
							select4 += $(this).val() + ",";	
						}
					});
					//去掉最后一个逗号(如果不需要去掉，就不用写)
					if (select4.length > 0) {
						select4 = select4.substr(0,select4.length - 1);
					}else{
						select4 = "";
					}
					//月龄判断
					if(ageMonth == 1){
						
					}else if(ageMonth == 2){
						result10 = 0;
					}else if(ageMonth == 3){
						mySwitch7 = 0;
					}else{
						result10 = 0;
						result5 = 0;
					}
					var data_object =[
						//体重
						{
						questionId:"89",
						answerId:0,
						answer:$('#kg').val()
						},
						//体重发育情况
						{
						questionId:"666",
						answerId:result2,
						answer:null
						},
						//身长
						{
						questionId:"88",
						answerId:0,
						answer:$('#cm').val()
						},
						//身长发育情况
						{
						questionId:"667",
						answerId:result3,
						answer:null
						},
						//面色
						{
						questionId:"401",
						answerId:result4,
						answer:null
						},
						//皮肤
						{
						questionId:"110",
						answerId:mySwitch5,
						answer:null
						},
						//皮肤1
						{
						questionId:"111",
						answerId:0,
						answer:$('#doc_5').val()
						},
						//前卤
						{
						questionId:"661",
						answerId:mySwitch6,
						answer:null
						},
						//前卤1
						{
						questionId:"403",
						answerId:0,
						answer:$('#front_1').val()
						},
						//前卤2
						{
						questionId:"404",
						answerId:0,
						answer:$('#front_2').val()
						},
						//眼睛
						{
						questionId:"406",
						answerId:mySwitch8,
						answer:null
						},
						//眼睛1
						{
						questionId:"407",
						answerId:0,
						answer:$('#doc_8').val()
						},
						//耳外观
						{
						questionId:"410",
						answerId:mySwitch9,
						answer:null
						},
						//耳外观1
						{
						questionId:"411",
						answerId:0,
						answer:$('#doc_9').val()
						},
						//听力
						{
						questionId:"107",
						answerId:mySwitch10,
						answer:null
						},
						//出牙数1
						{
						questionId:"433",
						answerId:0,
						answer:$('#tooth1').val()
						},
						//出牙数2
						{
						questionId:"663",
						answerId:0,
						answer:$('#tooth2').val()
						},
						//胸部
						{
						questionId:"749",
						answerId:mySwitch11,
						answer:null
						},
						//胸部1
						{
						questionId:"750",
						answerId:0,
						answer:$('#doc_11').val()
						},
						//腹部
						{
						questionId:"424",
						answerId:mySwitch12,
						answer:null
						},
						//腹部1
						{
						questionId:"425",
						answerId:0,
						answer:$('#doc_12').val()
						},
						//四肢
						{
						questionId:"408",
						answerId:mySwitch13,
						answer:null
						},
						//四肢1
						{
						questionId:"409",
						answerId:0,
						answer:$('#doc_13').val()
						},
						//步态
						{
						questionId:"664",
						answerId:mySwitch14,
						answer:null
						},
						//步态1
						{
						questionId:"665",
						answerId:0,
						answer:$('#doc_14').val()
						},
						//可疑佝偻病体症
						{
						questionId:"435",
						answerId:result5,
						answer:null
						},
						//血红蛋白值
						{
						questionId:"161",
						answerId:0,
						answer:$('#gl').val()
						},
						//户外活动
						{
						questionId:"436",
						answerId:0,
						answer:$('#outdoor').val()
						},
						//服用维生素D
						{
						questionId:"437",
						answerId:0,
						answer:$('#Vitamin').val()
						},
						//发育评估
						{
						questionId:"438",
						answerId:0,
						answer:select1
						},
						//两次随访间患病情况
						{
						questionId:"439",
						answerId:0,
						answer:select2
						},
						//两次随访间患病情况1
						{
						questionId:"443",
						answerId:0,
						answer:$('#feiyan_id').val()
						},
						//两次随访间患病情况2
						{
						questionId:"444",
						answerId:0,
						answer:$('#fuxie_id').val()
						},
						//两次随访间患病情况3
						{
						questionId:"445",
						answerId:0,
						answer:$('#waishang_id').val()
						},
						//两次随访间患病情况4
						{
						questionId:"446",
						answerId:0,
						answer:$('#two_follow_id').val()
						},
						//其它
						{
						questionId:"440",
						answerId:0,
						answer:$('#other').val()
						},
						//转诊
						{
						questionId:"332",
						answerId:mySwitch4,
						answer:null
						},
						//原因
						{
						questionId:"333",
						answerId:0,
						answer:$('#zz_why').val()
						},
						//科室
						{
						questionId:"334",
						answerId:0,
						answer:$('#zz_det').val()
						},
						//指导
						{
						questionId:"430",
						answerId:0,
						answer:select3
						},
						//指导其它
						{
						questionId:"668",
						answerId:0,
						answer:$('#zhidao').val()
						},
						//中医
						{
						questionId:"735",
						answerId:0,
						answer:select4
						},
						//中医其它
						{
						questionId:"736",
						answerId:0,
						answer:$('#zy').val()
						}
					]
					console.log(data_object)
					$.ajax(getRequestUrl.url+"/mobile/ehr/ChildHealth/addOrUpdate",{
						data:{
							id : id,
							ehrId : ehrId,
							visitLevel : visitLevel,
							doctorName : doctorName, 
							visitDate : visitDate,  
							nextDate : nextDate, 
							createUser : createUser, 
							updateUser : updateUser, 
							createDate : createDate, 
							updateDate : updateDate, 
							enableFlag : enableFlag, 
							doctorId : doctorId, 
							doctorHospId : doctorHospId, 
							ageMonth : ageMonth, 
							doctorHospName : doctorHospName, 
							kindergarten : kindergarten, 
							xkSign : xkSign, 
							versionNum : versionNum, 
							readcardCheck : readcardCheck
							},
						dataType:'json',//服务器返回json格式数据
						type:'post',//HTTP请求类型
						timeout:10000,//超时时间设置为10秒；
						success:function(data){
							console.log("成功1")
							var mid = data.total;
							for(var i=0; i<data_object.length; i++){
								data_object[i].ehrId = ehrId;
								data_object[i].childId = mid;
							}
							$.ajax(getRequestUrl.url+"/mobile/ehr/childHealthAnswer/addOrUpdate",{
								data:JSON.stringify(data_object),
								dataType:'json',//服务器返回json格式数据
								type:'post',//HTTP请求类型
								contentType : 'application/json;charset=utf-8',
								success:function(data){
									console.log("成功")
								},
								error:function(xhr,type,errorThrown){
									
								}
							});	
						},
						error:function(xhr,type,errorThrown){
							
						}
					});
				}
			}
		</script>
	</body>
</html>